<template>
	<view>
		<up-loading-page :loading="true" loadingText="loading..." v-if="showLoading"></up-loading-page>
	</view>
	<view>
		<view v-show="!showLoading">
			<view class="viewbox" style="background-color: #fff;"></view>
			<cu-custom :isBack="true">
			<block slot="content">账户设置</block>
		</cu-custom>
			
			<view class="group1">
				<view class="text1">头像</view>
				<image class="img1" src="../../static/people.png"></image>
			</view>
			
			<view class="group2">
				<view class="parse1">
					<view class="text2">昵称</view>
					<view class="text3">李四</view>
					<image class="img" src="../../static/箭头@2x.png"></image>
				</view>
				<image class="cross-line" src="../../static/横线.png"></image>
				<view class="parse2">
					<view class="text2">昵称</view>
					<view class="text3">李dg</view>
					<image class="img" src="../../static/箭头@2x.png"></image>
				</view>
				<image class="cross-line" src="../../static/横线.png"></image>
				<view class="parse3">
					<view class="text2">手机号</view>
					<view class="text3">13902822380</view>
					<image class="img" src="../../static/箭头@2x.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>
<script setup>
import request from '@/common/request.js';
import { onLoad } from '@dcloudio/uni-app'
import {
	loadingType
} from '@/utils/type';
import { ref,onMounted } from 'vue'
const showLoading = ref(true)

onMounted(() => {
  setTimeout(() => {
    showLoading.value = false;
  }, 1000);
});



onMounted(()=>{
	loginfo()
})

const information = ref({
	after_sale:0,
	avatar:'',
	earnings:'',
	finish:0,
	id:0,
	is_new_user:0,
	mobile:'',
	nickname:'',
	sn:'',
	total_order_amount:'',
	user_integral:'',
	user_money:'',
	wait_delivery:'',
	wait_pay:'',
	wait_take:''
})
const loginfo = ()=>{
	const uid = uni.getStorageSync('uid')
	uni.request({
		url:request.baseUrl+ 'u-role_config',
		method:'GET',
		data: {
		      uid: uid // 传递 uid 作为 Query 参数
		},
		success: (res) => {
		console.log(res)
		if(res.data.code===200){
			information.value = res.data.data
			console.log("得到",information.value)
		}else{
			console.log(res.data.data)
		}
		// addressObj.value = res.data.data
		// console.log("得到",addressObj.value)
		// console.log("code的",uid)
		},
	})
}


 </script>

<style lang="scss" scoped>
	page{
		background-color:#f6f6f6;
	}
	.group1{
		display: flex;
		background-color: #fff;
		height: 320rpx;
		border-radius: 0rpx 0rpx 20rpx 20rpx;
		.text1{
			font-size: 36rpx;
			padding-left: 26rpx;
			margin-top: 198rpx;
		}
		.img1{
			width: 120rpx;
			height: 120rpx;
			padding-left: 500rpx;
			margin-top: 170rpx;
		}
	}
	.group2{
		background-color: #fff;
		height: 450rpx;
		border-radius: 20rpx;
		margin-top: 30rpx;
		.parse1{
			display: flex;
			.text2{
				font-size: 30rpx;
				
				padding-left: 34rpx;
				padding-top: 62rpx;
			}
			.text3{
				font-size: 30rpx;
				padding-left: 500rpx;
				padding-top: 62rpx;
			}
			.img{
				width: 9rpx;
				height: 16rpx;
				
				margin-top: 74rpx;
				padding-left: 15rpx;
			}
			
		}
		.cross-line{
				width: 500rpx;
				height: 10rpx;
				margin-left: 220rpx;
				margin-top: 50rpx;
			}
		.parse2{
			display: flex;
			padding-top: 40rpx;
			.text2{
				font-size: 30rpx;		
				padding-left: 34rpx;
			}
			.text3{
				font-size: 30rpx;
				padding-left: 500rpx;
			}
			.img{
				width: 9rpx;
				height: 16rpx;
				margin-top: 14rpx;
				padding-left: 15rpx;
			}
		}
		.parse3{
			display: flex;
			padding-top: 40rpx;
			.text2{
				font-size: 30rpx;
				padding-left: 34rpx;
			}
			.text3{
				font-size: 30rpx;
				padding-left: 340rpx;
			}
			.img{
				width: 9rpx;
				height: 16rpx;
				margin-top: 14rpx;
				padding-left: 15rpx;
			}
		}
	}

	

</style>